From: Chun-wei Fan Date: Tue, 9 May 2023 10:10:34 +0000 (+0800) Subject: gdkglcontext-win32-wgl.c: Always request alpha bits X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~59^2^2~291^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=0073ee29da7dc1bfc3cc477206791056924adcbb;p=gtk4.git gdkglcontext-win32-wgl.c: Always request alpha bits ...when we are using wglChoosePixelFormatARHB(). This ensures that we hvae a HDC with a pixel format that will really support alpha bits, as we did for the traditional ChoosePixelFormat(). Thanks to Patrick Zacharias for testing and pointing things out. --- diff --git a/gdk/win32/gdkglcontext-win32-wgl.c b/gdk/win32/gdkglcontext-win32-wgl.c index 3721d7136e..fdc8e50e6e 100644 --- a/gdk/win32/gdkglcontext-win32-wgl.c +++ b/gdk/win32/gdkglcontext-win32-wgl.c @@ -171,6 +171,9 @@ get_wgl_pfd (HDC hdc, pixelAttribs[i++] = WGL_COLOR_BITS_ARB; pixelAttribs[i++] = colorbits; + pixelAttribs[i++] = WGL_ALPHA_BITS_ARB; + pixelAttribs[i++] = 8; + /* end of "Update PIXEL_ATTRIBUTES above if any groups are added here!" */ pixelAttribs[i++] = 0; /* end of pixelAttribs */